Total Complexity | 3 |
Total Lines | 34 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | import { BaseEndpoint } from './baseEndpoint'; |
||
7 | |||
8 | /** |
||
9 | * Companies Endpoint Class |
||
10 | */ |
||
11 | export class Company extends BaseEndpoint { |
||
12 | |||
13 | /** |
||
14 | * Get details for specified company |
||
15 | * @param { number } companyID |
||
16 | * @returns { Promise<CompanyDetailsResponse> } |
||
17 | * @see https://developers.themoviedb.org/3/companies/get-company-details |
||
18 | */ |
||
19 | public async details(companyID: number): Promise<CompanyDetailsResponse> { |
||
20 | return this.sendGetRequest(`company/${companyID}`); |
||
21 | } |
||
22 | |||
23 | /** |
||
24 | * Get alternative names for specified company |
||
25 | * @param { number } companyID |
||
26 | * @returns { Promise<CompanyAlternativeNamesResponse> } |
||
27 | * @see https://developers.themoviedb.org/3/companies/get-company-alternative-names |
||
28 | */ |
||
29 | public async alternativeNames(companyID: number): Promise<CompanyAlternativeNamesResponse> { |
||
30 | return this.sendGetRequest(`company/${companyID}/alternative_names`); |
||
31 | } |
||
32 | |||
33 | /** |
||
34 | * Get images for specified company |
||
35 | * @param { number } companyID |
||
36 | * @returns { Promise<CompanyImagesResponse> } |
||
37 | * @see https://developers.themoviedb.org/3/companies/get-company-images |
||
38 | */ |
||
39 | public async images(companyID: number): Promise<CompanyImagesResponse> { |
||
40 | return this.sendGetRequest(`company/${companyID}/images`); |
||
41 | } |
||
44 |